home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-telnet-envmnt-option-01.txt < prev    next >
Text File  |  1993-04-07  |  15KB  |  404 lines

  1.  
  2.  
  3. Network Working Group                               S. Alexander, Editor
  4. Internet-Draft                                  Lachman Technology, Inc.
  5.                                                               April 1993
  6.  
  7.  
  8.                        Telnet Environment Option
  9.  
  10. Status of this Memo
  11.  
  12.    This document is an Internet Draft.  Internet Drafts are working
  13.    documents of the Internet Engineering Task Force (IETF), its Areas,
  14.    and its Working Groups. Note that other groups may also distribute
  15.    working documents as Internet Drafts.
  16.  
  17.    Internet Drafts are draft documents valid for a maximum of six
  18.    months. Internet Drafts may be updated, replaced, or obsoleted by
  19.    other documents at any time.  It is not appropriate to use Internet
  20.    Drafts as reference material or to cite them other than as a "working
  21.    draft" or "work in progress."
  22.  
  23.    Please check the 1id-abstracts.txt listing contained in the
  24.    internet-drafts Shadow Directories on nic.ddn.mil, nnsc.nsf.net,
  25.    nic.nordu.net, ftp.nisc.sri.com, or munnari.oz.au to learn the
  26.    current status of any Internet Draft.
  27.  
  28. Abstract
  29.  
  30.    This document specifies a mechanism for passing environment
  31.    information between a telnet client and server.  Use of this
  32.    mechanism enables a telnet user to propagate configuration
  33.    information to a remote host when connecting.
  34.  
  35.    This document corrects some errors in [1].
  36.  
  37. 1.  Command Names and Codes
  38.  
  39.       ENVIRON         36
  40.           IS               0
  41.           SEND             1
  42.           INFO             2
  43.  
  44.           VALUE            0
  45.           VAR              1
  46.           ESC              2
  47.           USERVAR          3
  48.  
  49. 2.  Command Meanings
  50.  
  51.  
  52.  
  53.                           Expires October 1993                  [Page 1]
  54.  
  55. Internet-Draft         Telnet Environment Option              April 1993
  56.  
  57.  
  58.    IAC WILL ENVIRON
  59.  
  60.       The sender of this command is willing to send environment
  61.       variables.
  62.  
  63.    IAC WONT ENVIRON
  64.  
  65.       The sender of this command refuses to send environment variables.
  66.  
  67.    IAC DO ENVIRON
  68.  
  69.       The sender of this command is willing to receive environment
  70.       variables.
  71.  
  72.    IAC DONT ENVIRON
  73.  
  74.       The sender of this command refuses to accept environment
  75.       variables.
  76.  
  77.    IAC SB ENVIRON SEND [ type ... [ type ... [ ... ] ] ] IAC SE
  78.  
  79.       The sender of this command requests that the remote side send its
  80.       environment variables.  The "type" may be either VAR or USERVAR,
  81.       to indicate either well known or user variable names.  Only the
  82.       side that is DO ENVIRON may initiate a SEND command.  If a list of
  83.       variables is specified, then only those variables should be sent.
  84.       If no list is specified, then the default environment, of both
  85.       well known and user defined variables, should be sent.  If one of
  86.       the variables has no name, then all the variables of that type
  87.       (well known or user defined)  in the default environment should be
  88.       sent.
  89.  
  90.    IAC SB ENVIRON IS type ... [ VALUE ... ] [ type ... [ VALUE ... ] [
  91.    ... ] ] IAC SE
  92.  
  93.       The sender of this command is sending environment variables.  This
  94.       command is sent in response to a SEND request.  Only the side that
  95.       is WILL ENVIRON may send an IS command.  The "type"/VALUE pairs
  96.       must be returned in the same order as the SEND request specified
  97.       them, and there must be a response for each "type ..." explicitly
  98.       requested.  The "type" will be VAR or USERVAR.  Multiple
  99.       environment variables may be sent.  The characters following a
  100.       "type" up to the next "type" or VALUE specify the variable name.
  101.       The characters following a VALUE up to the next "type" specify the
  102.       value of the variable.  If a "type" is not followed by a VALUE
  103.       (e.g., by another VAR, USERVAR, or IAC SE) then that variable is
  104.       undefined.  If a VALUE is immediately followed by a "type" or IAC,
  105.       then the variable is defined, but has no value.  If an IAC is
  106.       contained between the IS and the IAC SE, it must be sent as IAC
  107.       IAC.  If a variable or a value contains a VAR, it must be sent as
  108.  
  109.  
  110.  
  111.                           Expires October 1993                  [Page 2]
  112.  
  113. Internet-Draft         Telnet Environment Option              April 1993
  114.  
  115.  
  116.       ESC VAR.  If a variable or a value contains a USERVAR, it must be
  117.       sent as ESC USERVAR.  If a variable or a value contains a VALUE,
  118.       it must be sent as ESC VALUE.  If a variable or a value contains
  119.       an ESC, it must be sent as ESC ESC.
  120.  
  121.    IAC SB ENVIRON INFO type ... [ VALUE ... ] [ type ... [ VALUE ... ] [
  122.    ... ] ] IAC SE
  123.  
  124.       The sender of this command is sending information about
  125.       environment variables that have changed.  It is identical to the
  126.       IS command, except that the command is INFO instead of IS.  Only
  127.       the side that is WILL ENVIRON may send an INFO command.  The INFO
  128.       command is not to be used to send initial information; the SEND/IS
  129.       sequence is to be used for that.  The INFO command is to be used
  130.       to propagate changes in environment variables, and may be
  131.       spontaneously generated.
  132.  
  133.  
  134. 3.  Default Specification
  135.  
  136.    The default specification for this option is
  137.  
  138.       WONT ENVIRON
  139.       DONT ENVIRON
  140.  
  141.    meaning there will not be any exchange of environment information.
  142.  
  143. 4.  Motivation
  144.  
  145.    Many operating systems have startup information and environment
  146.    variables that contain information that should be propagated to
  147.    remote machines when Telnet connections are established.  Rather than
  148.    create a new Telnet option each time someone comes up with some new
  149.    information that they need propagated through a Telnet session, but
  150.    that the Telnet session itself doesn't really need to know about,
  151.    this generic information option can be used.
  152.  
  153. 5.  Well Known Variables
  154.  
  155.    USER        This variable is used to transmit the user or account
  156.                name that the client wishes to log into on the remote
  157.                system.  The format of the value the USER variable is
  158.                system dependent, as determined by the remote system.
  159.  
  160.    JOB         This variable is used to transmit the job ID that the
  161.                client wishes to use when logging into the remote system.
  162.                The format of the value the JOB variable is system
  163.                dependent, as determined by the remote system.
  164.  
  165.    ACCT        This variable is used to transmit the account ID that the
  166.  
  167.  
  168.  
  169.                           Expires October 1993                  [Page 3]
  170.  
  171. Internet-Draft         Telnet Environment Option              April 1993
  172.  
  173.  
  174.                client wishes to use when logging into the remote system.
  175.                The format of the value the ACCT variable is system
  176.                dependent, as determined by the remote system.
  177.  
  178.    PRINTER     This variable is used to identify the default location
  179.                for printer output.  Because there does not currently
  180.                exist a standard way of naming a printer on a network,
  181.                the format of this variable is currently undefined.
  182.  
  183.    SYSTEMTYPE  This is used to transmit the type of operating system on
  184.                the system that sends this variable.  It value is
  185.                identical to the value of the SYSTEM (SYST) command in     
  186.                FTP [4].  The format of the value shall have as its first  |
  187.                word one of the system names listed in the current
  188.                version of the Assigned Numbers document [5].              |
  189.  
  190.    DISPLAY     This variable is used to transmit the X display location
  191.                of the client.  The format for the value of the DISPLAY
  192.                variable is:
  193.                   <host>:<dispnum>[.<screennum>]
  194.                This information is identical to the information passed
  195.                using the Telnet X-DISPLAY-LOCATION option.  If both the
  196.                DISPLAY environment variable, and the X-DISPLAY-LOCATION
  197.                option [6] are received, and they contain conflicting     |
  198.                information, the most recently received information
  199.                received should be used.
  200.  
  201.  
  202.    Because it is impossible to anticipate all variables that users may
  203.    wish to exchange, the USERVAR type is provided to allow users to
  204.    transmit arbitrary variable/value pairs.  The use of an additional
  205.    type allows implementations to distinguish between values derived by
  206.    the remote host software and values supplied by the user.  Paranoid
  207.    implementations will most likely treat both types with an equal level
  208.    of distrust.  The results of a name-space collision between a well-
  209.    known and a user variable are implementation specific.
  210.  
  211. 6.  Implementation Rules
  212.  
  213.    WILL and DO are used only at the beginning of the connection to
  214.    obtain and grant permission for future negotiations.
  215.  
  216.    Once the two hosts have exchanged a WILL and a DO, the sender of the
  217.    DO ENVIRON is free to request that environment variables be sent.
  218.    Only the sender of the DO may send requests (IAC SB ENVIRON SEND IAC
  219.    SE) and only the sender of the WILL may transmit actual environment
  220.    information (via the IAC SB ENVIRON IS ... IAC SE command).  Though
  221.    this option may be used at any time throughout the life of the telnet
  222.    connection, the exchange of environment information will usually
  223.    happen at the startup of the connection.  This is because many
  224.  
  225.  
  226.  
  227.                           Expires October 1993                  [Page 4]
  228.  
  229. Internet-Draft         Telnet Environment Option              April 1993
  230.  
  231.  
  232.    operating systems only have mechanisms for propagating environment
  233.    information at process creation, so the information is needed before
  234.    the user logs in.
  235.  
  236.    The receiving host is not required to put all variables that it
  237.    receives into the environment.  For example, if the client should
  238.    send across USERVAR "TERM" VALUE "xterm" as an environment variable,
  239.    and the TERMINAL-TYPE [3] option has already been used to determine    |
  240.    the terminal type, the server may safely ignore the TERM variable.
  241.    Also, some startup information may be used in other ways; for
  242.    example, the values for "USER", "ACCT" and "PROJ" values might be
  243.    used to decide which account to log into, and might never be put into
  244.    the users environment.  In general, if the server has already
  245.    determined the value of an environment variable by some more accurate
  246.    means, or if it does not understand a variable name, it may ignore
  247.    the value sent in the ENVIRON option.  The server may also prefer to
  248.    just put all unknown information into the users environment.  This is
  249.    the suggested method of implementation, because it allows the user
  250.    the most flexibility.
  251.  
  252.    The following is an example of use of the option:
  253.  
  254.        Host1                            Host2
  255.        IAC DO ENVIRON
  256.                                         IAC WILL ENVIRON
  257.        [ Host1 is now free to request environment information ]
  258.        IAC SB ENVIRON SEND VAR "USER"
  259.        VAR "ACCT" VAR USERVAR IAC SE
  260.        [ The server has now explicitly asked for the USER and ACCT
  261.          variables, the default set of well known environment variables,
  262.          and the default set of user defined variables.  Note that the
  263.          client includes the USER information twice; once because it was
  264.          explicitly asked for, and once because it is part of the
  265.          default environment.  ]
  266.                                         IAC SB ENVIRON IS VAR "USER"
  267.                                         VALUE "joe" VAR "ACCT" VALUE
  268.                                         "kernel" VAR "USER" VALUE "joe"
  269.                                         VAR "DISPLAY" VALUE "foo:0.0"
  270.                                         USERVAR "SHELL" VALUE "/bin/csh"
  271.                                         IAC SE
  272.  
  273.    It is legal for a client to respond with an empty environment (no
  274.    data between the IAC SB and IAC SE) when no well-defined or user
  275.    variables are currently defined.  For example:
  276.  
  277.       IAC SB ENVIRON IS IAC SE
  278.  
  279.    is a valid response to any of the following:
  280.  
  281.       IAC SB ENVIRON SEND IAC SE
  282.  
  283.  
  284.  
  285.                           Expires October 1993                  [Page 5]
  286.  
  287. Internet-Draft         Telnet Environment Option              April 1993
  288.  
  289.  
  290.       IAC SB ENVIRON SEND VAR IAC SE
  291.       IAC SB ENVIRON SEND USERVAR IAC SE
  292.       IAC SB ENVIRON SEND VAR USERVAR IAC SE
  293.  
  294.    (The last example is equivalent to the first...)
  295.  
  296.    The earlier version of this specification [1] incorrectly reversed     |
  297.    the values for VAR and VALUE,  which this put the specification at     |
  298.    odds with existing implementations.  For a discussion on how to        |
  299.    implement the Environment option to interoperate with implementations  |
  300.    that have incorrect definitions for VAR and VALUE, see [2].
  301.  
  302.    It is expected that any implementation that supports the Telnet
  303.    ENVIRON option will support all of this specification.
  304.  
  305. 7.  Security Concerns
  306.  
  307.    It is important for an implementor of the ENVIRON option to
  308.    understand the interaction of setting options and the
  309.    login/authentication process. Specifically careful analysis should be
  310.    done to determine which variables are "safe" to set prior to having
  311.    the client login.  An example of a bad choice would be permitting a
  312.    variable to be changed that allows an intruder to circumvent or
  313.    compromise the login/authentication program itself.
  314.  
  315. 8.  References
  316.  
  317.    [1] Borman, D., "Telnet Environment Option", RFC 1408, Cray Research,
  318.        Inc., January 1993.
  319.  
  320.    [2] Borman, D., "Telnet Environment Option Interoperability Issues",   |
  321.        Internet Draft, Cray Research, Inc., April 1993.                   |
  322.  
  323.    [3] VanBokkelen, J., "Telnet Terminal-Type Option", RFC 1091, FTP      |
  324.        Software, Inc., February 1989.
  325.  
  326.    [4] Postel, J. and J. Reynolds, "File Transfer Protocol (FTP)", STD    |
  327.        9, RFC 959, USC/Information Sciences Institute, October 1985.
  328.  
  329.    [5] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, RFC 1340,   |
  330.        USC/Information Sciences Institute, July 1992.
  331.  
  332.    [6] Marcy, G., "Telnet X Display Location Option", RFC 1096, Carnegie  |
  333.        Mellon University, March 1989.
  334.  
  335. Acknowledgements
  336.  
  337.    The original version of this document was written by Dave Borman of
  338.    Cray Research, Inc.  In addition, the comments of the Telnet Working
  339.    Group are gratefully acknowledged.
  340.  
  341.  
  342.  
  343.                           Expires October 1993                  [Page 6]
  344.  
  345. Internet-Draft         Telnet Environment Option              April 1993
  346.  
  347.  
  348. Security Considerations
  349.  
  350.    Security issues are discussed in Section 7.
  351.  
  352. Editor's Address
  353.  
  354.    Steve Alexander
  355.    Lachman Technology, Inc.
  356.    1901 North Naper Boulevard
  357.    Naperville, IL 60563-8895
  358.  
  359.    Phone: (708) 505-9555 x256
  360.    EMail: stevea@lachman.com
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.                           Expires October 1993                  [Page 7]
  402.  
  403.  
  404.